feat: Add support for auto-starting dashboard with openCode and config loading#7
Merged
Merged
Conversation
260af04 to
563bdca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new configuration system for the usage stats plugin, allowing users to customize dashboard behavior using a config file or environment variables. It also updates the plugin initialization to respect these configuration options when starting the dashboard server.
Configuration system and dashboard control:
UsageStatsConfiginterface and aloadConfigfunction insrc/config.tsto support loading configuration from JSON/JSONC files in the user's config directory, with fallback to environment variables for backward compatibility. This enables users to control dashboard enablement and port settings.src/plugin.tsto use the new configuration loader, and conditionally start the dashboard server based on the loaded configuration, ensuring the plugin will not fail if the dashboard cannot be started.Dependency and import updates:
src/plugin.ts, and updated repository-related imports to include garbage collection support.